<div ng-controller="borrowerMngrCtrl">
    <div class="row-content am-cf">
        <div class="row">
            <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                <div class="widget am-cf">
                    <div class="widget-head am-cf">
                        <div class="widget-title am-fl">图书借阅管理</div>
                        <div class="widget-function am-fr">
                            <!--<a href="javascript:;" class="am-icon-cog"></a>-->
                        </div>
                    </div>

                    <div class="widget-body  widget-body-lg am-fr">
                        <div class="am-u-sm-12 am-u-md-6 am-u-lg-4">
                            <div class="am-form-group">
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="am-u-sm-12 am-u-md-12 am-u-lg-2">
                            <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                                <input type="text" class="am-form-field " placeholder="请输入书名" title="请输入书名" ng-model="filter.bookName">
                            </div>
                        </div>
                        <div class="am-u-sm-12 am-u-md-12 am-u-lg-2">
                            <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                                <input type="text" class="am-form-field " placeholder="请输入作者" title="请输入作者" ng-model="filter.auth">
                            </div>
                        </div>
                        <div class="am-u-sm-12 am-u-md-12 am-u-lg-2">
                            <div class="am-form-group">
                                <select data-am-selected="{btnSize: 'sm'}" title="请选择借阅状态" style="color:darkslategrey; line-height:33px; height:33px;" ng-model="filter.status">
                                    <option value="">请选择借阅状态</option>
                                    <option value="0">已借出</option>
                                    <option value="1">已归还</option>
                                </select>
                            </div>
                        </div>
                        <div class="am-u-sm-12 am-u-md-12 am-u-lg-1">
                            <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                                <button type="button" class="am-btn am-btn-sm am-btn-success am-icon-search" ng-click="reflash()"> 查询</button>
                            </div>
                        </div>
                        <div class="am-u-sm-12 am-u-md-12 am-u-lg-1">
                            <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                                <button type="button" class="am-btn am-btn-sm am-btn-primary tpl-btn-bg-color-success " ng-click="edit(null)"><i class="am-icon-plus"></i> 新增</button>
                            </div>
                        </div>
                        <div class="am-u-sm-12">
                            <table ng-table="tableParams" class="am-table am-table-compact tpl-table-black " id="data-table" template-pagination="template/pagination.html">
                                <thead>
                                    <tr>
                                        <th style="text-align:left;">书名</th>
                                        <th style="text-align:left;">作者</th>
                                        <th style="text-align:left;">图书类型</th>
                                        <th style="text-align:left;">借阅人</th>
                                        <th style="text-align:left;">借出日期</th>
                                        <th style="text-align:left;">归还日期</th>
                                        <th style="text-align:left;">状态</th>
                                        <th style="text-align:left;">操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr class="gradeX" ng-repeat="item in $data">
                                        <td>{{item.bookName}}</td>
                                        <td>{{item.author}}</td>
                                        <td>{{item.bookCategoryName}}</td>
                                        <td>{{item.borrowerName}}</td>
                                        <td>{{item.borrowTime|date:'yyyy-MM-dd hh:mm:ss'}}</td>
                                        <td>{{item.returnTime|date:'yyyy-MM-dd hh:mm:ss'}}</td>
                                        <td>
                                            <span ng-if="item.status==0">已借出</span>
                                            <span ng-if="item.status==1">已归还</span>
                                        </td>
                                        <td>
                                            <div class="tpl-table-black-operation">
                                                <a href="javascript:;" ng-click="update(item)" ng-if="item.status==0">
                                                    <i class="am-icon-check"></i> 归还
                                                </a>
                                            </div>
                                        </td>
                                    </tr>

                                    <!-- more data -->
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>